#ifndef TFILE_
#define TFILE_
#include "stdafx.h"
//STARTPOINTS
#define S_CURRENT 1
#define S_BEGIN 0
#define S_END 2
//PARAMS
#define P_READ 1
#define P_WRITE 2
#define P_ADD 4
#define P_UPDATE 8
#define P_TEXT 16
#define P_BINARY 32
typedef unsigned int uint;

class TFile
{
public:
	TFile();
	~TFile();
	TFile(char*filename,uint Params);
	void Open(char*filename,uint Params);
	void Write(void * buf,uint uiSize, uint uiCount);
	void Read(void * buf,uint uiSize, uint uiCount);
	int Seek(int nCount, int StartPoint);
	FILE * Get();
private:
	FILE * file;
	bool IsOpened;

};

#endif